<!doctype html>
<html lang="zh-CH">
<head>
	<meta name="baidu-site-verification" content="VPrZFbo1SO" />
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	{{--<meta name="viewport" content="width=device-width, initial-scale=1">--}}
	<title>木投网_木业产业链服务_红木供应采购_原材料商城</title>
	<link rel="stylesheet" href="/resource/css/mt_index.css">
	<link rel="stylesheet" href="/resource/css/mt_showBo.css">
</head>
<body>
@include('common.shop_head')
<!-- banner -->
<div class="banner">
	<ul class="slides">
		@foreach($info['ads'] as $k)
		<li class="active"><a href="{{$k->link}}"><img src="{{$k->img}}" alt=""></a></li>
			@endforeach
	</ul>
	<div class="main">
		<div class="act-wrap-right">
			<div class="act-t">免费找货助手</div>
			@include('common.shop_release')
			<div class="act-pic"></div>
		</div>
	</div>
</div>
<!-- shopcont -->
<div class="shop-cont main">
	<!-- 热门采购 -->
	<div class="cont-hot floor-0" id="floor-1">
		<div class="hot-til">
			<h2>热门采购<small>如果您想快速、省心找到您想要的木材，快去发布吧！</small></h2>
			<a href="/select_purchase">查看更多采购信息 &#62</a>
			<i></i>
		</div>
		<div class="hot-box">
			<div class="hot-table left">
				<table>
					<thead>
						<tr>
							<th width="170px">商品标题</th>
							<th width="150px">规格</th>
							<th width="150px">数量</th>
							<th width="100px">价格</th>
							<th width="150px">交货地</th>
							<th width="100px">发布时间</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody>
					@foreach($purchase as $v)
						<tr>
							<td><div class="tit">{{$v->title}}</div></td>
							<td><div>{{$v->spec}}</div></td>
							<td><div>{{$v->num}}{{$v->unit}}</div></td>
							<td><div><span>@if($v->price == 0)面议@else￥{{$v->price}}/{{$v->unit}}@endif</span></div></td>
							<td><div>{{$v->place}}</div></td>
							<td><div>{{date('Y-m-d',$v->created)}}</div></td>
							<td>
									@if(session_get(UserEnum::USER_INFO_SESSION_KEY))
									<div class="btn-a">查看
									<ul class="hot-info">
										<li><span>联系人：</span>{{$v->contacts}}</li>
										<li><span>电话：</span>{{$v->tell}}</li>
										<li><span>公司：</span>{{$v->company}}</li>
										<li><span>交货地：</span>{{$v->address}}</li>
										<li><span>备注：</span>{{$v->sign}}</li>
										<li><div>联系我时，请说是在木投网上看到的，谢谢！</div></li>
									</ul>
									</div>
										@else
									<div class="btn-a">查看</div>
									<script>
										//登录
										$('.hot-table td .btn-a').click(function(){
											$('.popup-login').show();
											$('.popup').show();
										});
									</script>
										@endif
							</td>
						</tr>
						@endforeach
					</tbody>
				</table>
			</div>
			<div class="order-dy left">
				<div class="til">订单动态</div>
				<ul class="order-ul order-ul-til">
					<li>
						<div class="mj">买家</div>
						<div class="cg">采购商品</div>
						<div class="jy">交易状态</div>
						<div class="sj">时间</div>
					</li>
				</ul>
				<div class="order-ul" id="order-ul">
					<ul>
						<li>
							<div class="mj">苏**</div>
							<div class="cg">松木</div>
							<div class="jy succ">交易成功</div>
							<div class="sj">07-02</div>
						</li>
						<li>
							<div class="mj">王**</div>
							<div class="cg">黄花梨</div>
							<div class="jy succ">交易成功</div>
							<div class="sj">07-02</div>
						</li>
						<li>
							<div class="mj">李**</div>
							<div class="cg">松木</div>
							<div class="jy unsucc">洽谈中</div>
							<div class="sj">06-02</div>
						</li>
						<li>
							<div class="mj">周**</div>
							<div class="cg">樟子松</div>
							<div class="jy unsucc">洽谈中</div>
							<div class="sj">06-02</div>
						</li>
						<li>
							<div class="mj">赵**</div>
							<div class="cg">柏木</div>
							<div class="jy succ">交易成功</div>
							<div class="sj">06-02</div>
						</li>
						<li>
							<div class="mj">万**</div>
							<div class="cg">杨木</div>
							<div class="jy succ">交易成功</div>
							<div class="sj">06-02</div>
						</li>
						<li>
							<div class="mj">庄**</div>
							<div class="cg">金丝楠木</div>
							<div class="jy succ">交易成功</div>
							<div class="sj">06-02</div>
						</li>
						<li>
							<div class="mj">刘**</div>
							<div class="cg">乌木</div>
							<div class="jy unsucc">洽谈中</div>
							<div class="sj">06-02</div>
						</li>
						<li>
							<div class="mj">程**</div>
							<div class="cg">樟子松</div>
							<div class="jy unsucc">洽谈中</div>
							<div class="sj">06-02</div>
						</li>
					</ul>
				</div>
				@if(session_get(UserEnum::USER_INFO_SESSION_KEY))
				<a href="javascript:;" class="btn-order">发布采购单</a>
					<script>
						$(".btn-order").click(function(){
							$('.popup-order').show();
							$('.popup').show();
						});
					</script>
				@else
					<a href="javascript:;" class="btn-order">发布采购单</a>

				<script>
					$('.btn-order').click(function(){
						$('.popup-login').show();
						$('.popup').show();
					});
				</script>
			@endif
			</div>
		</div>
	</div>
	<!-- 楼层1 -->
	@for($i=1;$i<4;$i++)
	<div class="floor floor-{{$i}}" id="floor-{{$i+1}}">
		<div class="floor-til">
			<h2><span>{{$i}}F</span> {{Cache::get('cache_cate')[$i-1]['name']}}</h2>
			<a href="/shopping?category={{Cache::get('cache_cate')[$i-1]['id']}}">更多 &#62</a>
		</div>
		<div class="floor-cont">
				@if($i==1)
                    <div class="floor-l left">
                        <div class="l-img">
                            <ul class="slides">
                                @foreach($info['ads_log'] as $v)
                                <li><a href="javascript:;"><img src="{{$v->img}}" alt=""></a></li>
                                @endforeach
                            </ul>
                        </div>
                        <div class="l-cation">
                            @foreach(Cache::get('cache_cate')[$i-1]['classes'] as $k=>$v)
                                <?php if(count($v['quality'])<6){
                                    $len=count($v['quality']);
                                }else{
                                    $len=5;
                                }
                                ?>
                                @for($ii=0;$ii<$len;$ii++)
                                    <a href="/shopping?quality={{$v['quality'][$ii]['id']}}&index_type=shopping">{{$v['quality'][$ii]['name']}}</a>
                                @endfor
                            @endforeach

                        </div>
                    </div>
                <div class="floor-r left">
				@foreach($info['products_log'] as $v)

				<div class="floor-shop">
					<div class="shop-img">
						<a href="shopping_details/?product_id={{$v->product_id}}&category={{$v->category}}"><img src="{{$v->product_img}}" alt=""></a>
					</div>
					<div class="shop-info">
						<a href="shopping_details/?product_id={{$v->product_id}}&category={{$v->category}}" class="name"><span>{{$v->product_name}}</span></a>
						<div class="price">￥{{$v->price}}/{{$v->unit}}</div>
					</div>
				</div>
					@endforeach
					@elseif($i==2)
                        <div class="floor-l left">
                            <div class="l-img">
                                <ul class="slides">
                                    @foreach($info['ads_domestic'] as $v)
                                        <li><a href="javascript:;"><img src="{{$v->img}}" alt=""></a></li>
                                    @endforeach
                                </ul>
                            </div>
                            <div class="l-cation">
                                @foreach(Cache::get('cache_cate')[$i-1]['classes'] as $k=>$v)
                                    <?php if(count($v['quality'])<6){
                                        $len=count($v['quality']);
                                    }else{
                                        $len=5;
                                    }
                                    ?>
                                    @for($ii=0;$ii<$len;$ii++)
                                        <a href="/shopping?quality={{$v['quality'][$ii]['id']}}&index_type=shopping">{{$v['quality'][$ii]['name']}}</a>
                                    @endfor
                                @endforeach

                            </div>
                        </div>
                        <div class="floor-r left">
					@foreach($info['products_domestic'] as $v)
						<div class="floor-shop">
							<div class="shop-img">
								<a href="shopping_details/?product_id={{$v->product_id}}&category={{$v->category}}"><img src="{{$v->product_img}}" alt=""></a>
							</div>
							<div class="shop-info">
								<a href="shopping_details/?product_id={{$v->product_id}}&category={{$v->category}}" class="name"><span>{{$v->product_name}}</span></a>
								<div class="price">￥{{$v->price}}/{{$v->unit}}</div>
							</div>
						</div>
					@endforeach
					@elseif($i==3)
                            <div class="floor-l left">
                                <div class="l-img">
                                    <ul class="slides">
                                        @foreach($info['ads_slab'] as $v)
                                            <li><a href="javascript:;"><img src="{{$v->img}}" alt=""></a></li>
                                        @endforeach
                                    </ul>
                                </div>
                                <div class="l-cation">
                                    @foreach(Cache::get('cache_cate')[$i-1]['classes'] as $k=>$v)
                                        <?php if(count($v['quality'])<6){
                                            $len=count($v['quality']);
                                        }else{
                                            $len=5;
                                        }
                                        ?>
                                        @for($ii=0;$ii<$len;$ii++)
                                            <a href="/shopping?quality={{$v['quality'][$ii]['id']}}&index_type=shopping">{{$v['quality'][$ii]['name']}}</a>
                                        @endfor
                                    @endforeach

                                </div>
                            </div>
                            <div class="floor-r left">
					@foreach($info['products_slab'] as $v)
						<div class="floor-shop">
							<div class="shop-img">
								<a href="shopping_details/?product_id={{$v->product_id}}&category={{$v->category}}"><img src="{{$v->product_img}}" alt=""></a>
							</div>
							<div class="shop-info">
								<a href="shopping_details/?product_id={{$v->product_id}}&category={{$v->category}}" class="name"><span>{{$v->product_name}}</span></a>
								<div class="price">￥{{$v->price}}/{{$v->unit}}</div>
							</div>
						</div>
					@endforeach
					{{--@elseif($i==4)
					@foreach($info['products_art'] as $v)
						<div class="floor-shop">
							<div class="shop-img">
								<a href="shopping_details/?product_id={{$v->product_id}}&category={{$v->category}}"><img src="{{$v->product_img}}" alt=""></a>
							</div>
							<div class="shop-info">
								<a href="shopping_details/?product_id={{$v->product_id}}&category={{$v->category}}" class="name"><span>{{$v->product_name}}</span></a>
								<div class="price">￥{{$v->price}}/{{$v->unit}}</div>
							</div>
						</div>
					@endforeach--}}
					@endif
			</div>
		</div>
		@if($i==1)
		<div class="floor-recommend">
			<div class="recommend-til">合作伙伴<i></i></div>
			<ul>
				<li><a href="javascript:;"><img src="/resource/img/logo-01.jpg" alt=""></a></li>
				<li><a href="javascript:;"><img src="/resource/img/logo-02.jpg" alt=""></a></li>
				<li><a href="javascript:;"><img src="/resource/img/logo-03.jpg" alt=""></a></li>
				<li class="last"><a href="javascript:;"><img src="/resource/img/logo-04.jpg" alt=""></a></li>
			</ul>
		</div>
			@elseif($i==2)
			<div class="floor-recommend">
				<div class="recommend-til">合作伙伴<i></i></div>
				<ul>
					<li><a href="javascript:;"><img src="/resource/img/logo-05.jpg" alt=""></a></li>
					<li><a href="javascript:;"><img src="/resource/img/logo-06.jpg" alt=""></a></li>
					<li><a href="javascript:;"><img src="/resource/img/logo-07.jpg" alt=""></a></li>
					<li class="last"><a href="javascript:;"><img src="/resource/img/logo-08.jpg" alt=""></a></li>
				</ul>
			</div>
			@elseif($i==3)
			<div class="floor-recommend">
				<div class="recommend-til">合作伙伴<i></i></div>
				<ul>
					<li><a href="javascript:;"><img src="/resource/img/logo-09.jpg" alt=""></a></li>
					<li><a href="javascript:;"><img src="/resource/img/logo-10.jpg" alt=""></a></li>
					<li><a href="javascript:;"><img src="/resource/img/logo-11.jpg" alt=""></a></li>
					<li class="last"><a href="javascript:;"><img src="/resource/img/logo-12.jpg" alt=""></a></li>
				</ul>
			</div>
			@endif
	</div>
	@endfor
</div>
<!-- 发布采购单 -->
<div class="popup-order">
	<div class="order-til">
		发布采购单
		<div class="order-close"></div>
	</div>
	<div class="order-info">
		温馨提示：发布成功后，1个工作日内审核完毕，信息越详细，越容易为您匹配到资源。
	</div>
		<div class="form-group">
			<label for="">商品标题：</label>
			<input type="text" id="title"  class="form-control" placeholder="如：求购金丝楠木" >
			<i class="i-red">*</i>
			<span></span>
		</div>
		<div class="form-group">
			<label for="">规格：</label>
			<input type="text" id="spec" class="form-control" placeholder="请填写规格">
			<i class="i-red">*</i>
			<span></span>
		</div>
		<div class="form-group form-two">
			<label for="">数量：</label>
			<input type="text" id="num" class="form-control" placeholder="采购数量">
			<i class="i-red">*</i>
			<span></span>
		</div>
		<div class="form-group form-two">
			<label for="">单位：</label>
			<select id="unit"  class="form-control">
				<option value="立方米">立方米</option>
				<option value="平方米">平方米</option>
				<option value="吨">吨</option>
				<option value="张">张</option>
				<!--<option value="公斤">公斤</option>
				<option value="千克">千克</option>
				<option value="套">套</option>
				<option value="件">件</option>
				<option value="组">组</option>
				<option value="把">把</option>
				<option value="对">对</option>-->

			</select>
			<i class="i-red">*</i>
			<span></span>
		</div>
		<div class="form-group form-two clear">
			<label for="">价格：</label>
			<input type="text" id="price"  class="form-control" placeholder="请填写数字或面议">
			<i class="i-red">*</i>
			<span></span>
		</div>
		<div class="form-group form-two clear">
			<label for="">交货地：</label>
			<select id="place" class="form-control">
				<option value="北京">北京</option>
				<option value="上海">上海</option>
				<option value="天津">天津</option>
				<option value="重庆">重庆</option>
				<option value="广东">广东</option>
				<option value="四川">四川</option>
				<option value="浙江">浙江</option>
				<option value="贵州">贵州</option>
				<option value="辽宁">辽宁</option>
				<option value="江苏">江苏</option>
				<option value="福建">福建</option>
				<option value="河北">河北</option>
				<option value="河南">河南</option>
				<option value="吉林">吉林</option>
				<option value="黑龙江">黑龙江</option>
				<option value="山东">山东</option>
				<option value="安徽">安徽</option>
				<option value="广西">广西</option>
				<option value="海南">海南</option>
				<option value="内蒙古">内蒙古</option>
				<option value="山西">山西</option>
				<option value="宁夏">宁夏</option>
				<option value="甘肃">甘肃</option>
				<option value="陕西">陕西</option>
				<option value="青海">青海</option>
				<option value="湖北">湖北</option>
				<option value="湖南">湖南</option>
				<option value="江西">江西</option>
				<option value="云南">云南</option>
				<option value="新疆">新疆</option>
				<option value="香港">香港</option>
				<option value="澳门">澳门</option>
			</select>
			<input type="text" id="address" class="form-control form-address" placeholder="详细地址">
			<i class="i-red">*</i>
			<span></span>
		</div>
		<div class="form-group clear">
			<label for="">备注：</label>
			<textarea id="sign" class="form-control"></textarea>
		</div>
		<div class="form-hr"></div>
	@if($user_id)
		<div class="form-group form-two">
			<label for="">联系人：</label>
			<input type="text" id="contacts" class="form-control" placeholder="" value="{{$user->user_name}}">
			<i class="i-red">*</i>
			<span></span>
		</div>
		<div class="form-group form-two">
			<label for="">电话：</label>
			<input type="text" id="tell" class="form-control" placeholder="" value="{{$user->mobile}}">
			<i class="i-red">*</i>
			<span></span>
		</div>
		<div class="form-group clear">
			<label for="">公司：</label>
			<input type="text" id="company" class="form-control" placeholder="" value="{{$user->corporation}}">
			<i class="i-red">*</i>
			<span></span>
		</div>
	@endif
		<button type="submit" class="btn-immed">立即发布</button>
</div>
<!-- 文章 -->
<div class="article-box main">
	<div class="article">
		<div class="article-l left">
			<div class="til">
				<h2>木业资讯</h2>
				<a href="/information_list?cate=100">更多 &#62</a>
				<div class="under-h2"></div>
			</div>
			<div class="cont">
				<div class="article-cont-l left">
					<ul class="art-l-img slides">
                        <?php
                        if(count($information['information'])<3){
                            $len = count($information['information']);
                        }else{
                            $len=3;
                        }
                        ?>
                        @for($i=0;$i<$len;$i++)
						<li><a href="/information_details?id={{$information['information'][$i]->zx_id}}"><img src="{{$information['information'][$i]->thumb_img1}}" alt=""></a></li>
							@endfor
					</ul>
				</div>
				<div class="article-cont-r left">
					<ul>
						@foreach($information['information'] as $v)
						<li>
							<a href="/information_details?id={{$v->zx_id}}">{{mb_substr($v->title,0,14,'utf-8')}}<span>{{date('Y-m-d',$v->created)}}</span></a>
						</li>
						@endforeach
					</ul>
				</div>
			</div>
		</div>
		<div class="article-l left">
			<div class="til">
				<h2>木业行情</h2>
				<a href="/information_list?cate=101">更多 &#62</a>
				<div class="under-h2"></div>
			</div>
			<div class="cont">
				<div class="article-cont-l left">
					<ul class="art-l-img slides">
                       <?php
                        if(count($information['conjuncture'])<3){
                            $len = count($information['conjuncture']);
                        }else{
                            $len=3;
                        }
                        ?>
                        @for($i=0;$i<$len;$i++)
							<li><a href="/information_details?id={{$information['conjuncture'][$i]->zx_id}}"><img src="{{$information['conjuncture'][$i]->thumb_img1}}" alt=""></a></li>
                        @endfor
					</ul>
				</div>
				<div class="article-cont-r left">
					<ul>
						@foreach($information['conjuncture'] as $v)
							<li>
								<a href="/information_details?id={{$v->zx_id}}">{{mb_substr($v->title,0,14,'utf-8')}}<span>{{date('Y-m-d',$v->created)}}</span></a>
							</li>
						@endforeach
					</ul>
				</div>
			</div>
		</div>
	</div>
</div>
<!-- web info -->
<div class="index-info main">
	<div class="info-cont">
		<div class="til">撮合+自营</div>
		<div class="img img-1"></div>
		<p>高品质货源，高效服务，安全支付买卖<br/>木材就上木投网</p>
	</div>
	<div class="info-cont">
		<div class="til">物流支持</div>
		<div class="img img-2"></div>
		<p>7*24小时服务，线路覆盖全面，<br/>货物交付畅行，厂家直送，全程信息透明</p>
	</div>
	<div class="info-cont">
		<div class="til">仓储服务</div>
		<div class="img img-3"></div>
		<p>全天候服务，保障货物安全，<br/>严格把控省心、省力</p>
	</div>
	<div class="info-cont">
		<div class="til">金融支持</div>
		<div class="img img-4"></div>
		<p>联合第三方金融机构定制快速、<br/>高效的供应链金融产品，配套专<br/>业的支付系统，提供更多优质金融服务</p>
	</div>
</div>
<!-- 楼层 -->
<div class="pos-floor">
	<ul>
		<li><a href="javascript:;" class="pos-floor-0"></a></li>
		<li><a href="javascript:;" class="pos-floor-1"></a></li>
		<li><a href="javascript:;" class="pos-floor-2"></a></li>
		<li><a href="javascript:;" class="pos-floor-3"></a></li>
		<li><a href="javascript:;" class="pos-floor-4"></a></li>
	</ul>	
</div>
@include('common.shop_foot')
<script src="/resource/js/jquery-1.11.3.min.js"></script>
<script src="/resource/js/mt_index.js"></script>
<script src="/resource/js/mt_index_floor.js"></script>
<script src="/resource/js/jquery.kxbdmarquee.js"></script>     <!-- 文字滚动 -->
<script src="/resource/js/jquery.flexslider-min.js"></script> <!-- banner -->
<script src="/resource/js/mt_showBo.js"></script>  <!-- 提示信息 -->
<script>
    //订单动态时间
    function digitTen(n){
        if(n < 10){
            return "0" + n;
        }else{
            return n;
        }
    }
    var myDate = new Date();
    $('.sj').html(digitTen(myDate.getMonth()+1)+'-'+digitTen(myDate.getDate())).eq(0).html('时间');
    $("#order-ul").kxbdMarquee({ direction: "up", isEqual: false, scrollDelay: 30 });//文字滚动
	$('.banner').flexslider({	//banner轮播
		directionNav: true,
		pauseOnAction: false
	});
	$('.article-cont-l').flexslider({  //文章图片轮播
		directionNav: true,
		pauseOnAction: false
	});
	$('.l-img').flexslider({  //楼层
		directionNav: true,
		pauseOnAction: false
	});
	$('.form-control').blur(function(){
		if($(this).val()==''){
			$(this).siblings('span').show().html('不能为空');
		}else{
			$(this).siblings('span').hide();
		}
	});
	$('.btn-immed').click(function(){
		var title = $('#title').val();
		var spec = $('#spec').val();
		var num = $('#num').val();
		var unit = $('#unit').val();
		var place = $('#place').val();
		var price = $('#price').val();
		var address = $('#address').val();
		var sign = $('#sign').val();
		var contacts = $('#contacts').val();
		var tell = $('#tell').val();
		var company = $('#company').val();
		if(title==''){
			$('#title').siblings('span').show().html('不能为空');
			return false;
		}else{
			$('#title').siblings('span').hide();
		}
		if(spec==''){
			$('#spec').siblings('span').show().html('不能为空');
			return false;
		}else{
			$('#spec').siblings('span').hide();
		}
		if(num==''){
			$('#num').siblings('span').show().html('不能为空');
			return false;
		}else{
			$('#num').siblings('span').hide();
		}
		if(unit==''){
			$('#unit').siblings('span').show().html('不能为空');
			return false;
		}else{
			$('#unit').siblings('span').hide();
		}
		if(place==''){
			$('#place').siblings('span').show().html('不能为空');
			return false;
		}else{
			$('#place').siblings('span').hide();
		}
		if(price==''){
			$('#price').siblings('span').show().html('不能为空');
			return false;
		}else{
			$('#price').siblings('span').hide();
		}
		if(address==''){
			$('#address').siblings('span').show().html('不能为空');
			return false;
		}else{
			$('#address').siblings('span').hide();
		}
		if(contacts==''){
			$('#contacts').siblings('span').show().html('不能为空');
			return false;
		}else{
			$('#contacts').siblings('span').hide();
		}
		if(tell==''){
			$('#tell').siblings('span').show().html('不能为空');
			return false;
		}else{
			$('#tell').siblings('span').hide();
		}
		if(company==''){
			$('#company').siblings('span').show().html('不能为空');
			return false;
		}else{
			$('#company').siblings('span').hide();
		}
		$('.form-group span').hide();
		$.ajax({
			url : '/add_purchase',
			type : "POST",
			data : {title:title,spec:spec,num:num,unit:unit,place:place,price:price,address:address,sign:sign,contacts:contacts,tell:tell,company:company},
			dataType : "json",
			cache:"false",
			timeout:30000,
			success : function(json) {
				if(json.code >= 1){
					Showbo.Msg.alert('<img src="/resource/img/popup_success.png" alt=""><br/>您的采购需求已经成功提交，请等待交易员与您联系<br/><br/>');
					$('#dvMsgBtns input.btn').css('width','140px');
				}
			}
		});
        $('.popup-order').hide();
		$('.popup').hide();
	});
//	$('.btn-immed').click(function(){
//		Showbo.Msg.alert('<img src="/resource/img/popup_success.png" alt=""><br/>我们会尽快为您审核，并且帮您找到更合适的资源');
//	});

	//发布采购单
//	$('.btn-immed').click(function(){
//		$('.popup-order').hide();
//		$('.popup').hide();
//	});
</script>
        </div></div>
</body>
</html>